package pt.nmfa.peste.entity;

// Generated Mar 5, 2011 1:52:20 PM by Hibernate Tools 3.3.0.GA

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.validator.Length;
import org.hibernate.validator.NotNull;

/**
 * ActionParameters generated by hbm2java
 */
@Entity
@Table(name = "actionParameters", catalog = "HomeDB")
public class ActionParameters implements java.io.Serializable {

	private Integer actionParametersId;
	private DeviceActions deviceActions;
	private String parameterName;
	private String parameterValue;

	public ActionParameters() {
	}

	public ActionParameters(DeviceActions deviceActions, String parameterName,
			String parameterValue) {
		this.deviceActions = deviceActions;
		this.parameterName = parameterName;
		this.parameterValue = parameterValue;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "actionParametersId", unique = true, nullable = false)
	public Integer getActionParametersId() {
		return this.actionParametersId;
	}

	public void setActionParametersId(Integer actionParametersId) {
		this.actionParametersId = actionParametersId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "deviceActionsId", nullable = false)
	@NotNull
	public DeviceActions getDeviceActions() {
		return this.deviceActions;
	}

	public void setDeviceActions(DeviceActions deviceActions) {
		this.deviceActions = deviceActions;
	}

	@Column(name = "parameterName", nullable = false, length = 30)
	@NotNull
	@Length(max = 30)
	public String getParameterName() {
		return this.parameterName;
	}

	public void setParameterName(String parameterName) {
		this.parameterName = parameterName;
	}

	@Column(name = "parameterValue", nullable = false, length = 250)
	@NotNull
	@Length(max = 250)
	public String getParameterValue() {
		return this.parameterValue;
	}

	public void setParameterValue(String parameterValue) {
		this.parameterValue = parameterValue;
	}

}
